package com.totem.admin.api;

import com.totem.base.model.PageVO;
import com.totem.base.model.Result;
import com.totem.customer.vo.*;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

@Tag(name="AdminCustomerServiceApi", description="客户信息后台服务")
public interface AdminCustomerServiceApi {
    @Operation(summary="更新客户信息")
    @PostMapping("/admin/customer/update")
    @ResponseBody
    Result<Boolean> update(@RequestBody CustomerUpdateVO vo);
    @Operation(summary="删除客户信息")
    @PostMapping("/admin/customer/delete")
    @ResponseBody
    Result<Boolean> delete(@RequestBody CustomerDelVO vo);
    @Operation(summary="分页展示客户列表")
    @PostMapping("/admin/customer/page")
    @ResponseBody
    Result<PageVO<CustomerVO>> customerPage(@RequestBody CustomerPageVO vo);
    @Operation(summary="根据主键查询客户信息")
    @GetMapping("/admin/customer/getVoById")
    @ResponseBody
    Result<CustomerVO> getVoById(@RequestParam(value="id") Long id);
    @Operation(summary="客户登陆", description="该接口不需要认证,返回token用于调用其他接口的认证")
    @PostMapping("/admin/customer/login")
    @ResponseBody
    Result<CustomerLoginVO> login(@RequestBody @Valid CustomerLoginVO vo);
    @Operation(summary="客户退出")
    @PostMapping("/admin/customer/logout")
    @ResponseBody
    Result<Boolean> logout(@RequestBody CustomerLogoutVO vo);
    @Operation(summary="修改密码")
    @PostMapping("/admin/customer/password/update")
    @ResponseBody
    Result<Boolean> updatePassword(@RequestBody UpdatePasswordVO vo);

    @Operation(summary="修改交易密码")
    @PostMapping("/admin/customer/txpassword/update")
    @ResponseBody
    Result<Boolean> updateTxPassword(@RequestBody UpdateTxPasswordVO vo);
}
